package com.tanhua.manager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.manager.domain.AnalysisByDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

public interface AnalysisMapper extends BaseMapper<AnalysisByDay> {
    @Select("SELECT SUM(num_registered) FROM tb_analysis_by_day")
    Integer cumulativeUsers();

    @Select("select sum(num_active) from tb_analysis_by_day where record_date between #{start} and #{end}")
    Integer activePassTime(@Param("start") Date startDate, @Param("end") Date endDate);

}
